package com.xiuyanwitmed.wxapi.controller;

import com.xiuyanwitmed.common.core.controller.BaseController;
import com.xiuyanwitmed.common.core.domain.entity.SysUser;
import com.xiuyanwitmed.common.core.page.TableDataInfo;
import com.xiuyanwitmed.system.service.ISysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/wxapi/user")
@RequiredArgsConstructor
@Api(tags = "微信端-部门信息")
public class WxUserController extends BaseController {

    private final ISysUserService userService;

    @GetMapping("/list")
    @ApiOperation(value = "获取用户列表")
    public TableDataInfo list(SysUser user)
    {
        startPage();
        List<SysUser> list = userService.selectUserList(user);
        return getDataTable(list);
    }
}
